package cn.edu.wtbu.wtbu_music_server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName album
 */
@Schema(description = "专辑对象")
@TableName(value ="album")
@Data
public class Album implements Serializable {
    /**
     * 专辑id
     */
    @Schema(description = "专辑id",example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 专辑名
     */
    @Schema(description = "专辑名",example = "七里香")
    private String name;

    /**
     * 封面图地址
     */
    @Schema(description = "封面图地址",example = "http://localhost:8080/img/album/1.jpg")
    private String img;

    /**
     * 发行时间
     */
    @Schema(description = "发行时间",example = "2024-01-01")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate releasetime;

    /**
     * 唱片公司
     */
    @Schema(description = "唱片公司",example = "杰威尔唱片")
    private String company;

    /**
     * 专辑类型：0-单曲 ;1-录音室专辑；2-演唱会
     */
    @Schema(description = "专辑类型：0-单曲 ;1-录音室专辑；2-演唱会",example = "0",allowableValues = "0,1,2")
    private String type;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}